
package com.jf.cloud.product.service.impl;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.util.PageUtil;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.product.mapper.StockChangeReasonStatusMapper;
import com.jf.cloud.product.model.StockChangeReasonStatus;
import com.jf.cloud.product.service.StockChangeReasonStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 出入库原因状态
 *
 * @author zz
 * @date 2022-06-22 16:57:27
 */
@Service
public class StockChangeReasonStatusServiceImpl implements StockChangeReasonStatusService {

    @Autowired
    private StockChangeReasonStatusMapper stockChangeReasonStatusMapper;

    @Override
    public PageVO<StockChangeReasonStatus> page(PageDTO pageDTO) {
        return PageUtil.doPage(pageDTO, () -> stockChangeReasonStatusMapper.list());
    }

    @Override
    public StockChangeReasonStatus getByStockChangeReasonStatusId(Long stockChangeReasonStatusId) {
        return stockChangeReasonStatusMapper.getByStockChangeReasonStatusId(stockChangeReasonStatusId);
    }

    @Override
    public void save(StockChangeReasonStatus stockChangeReasonStatus) {
        stockChangeReasonStatusMapper.save(stockChangeReasonStatus);
    }

    @Override
    public void update(StockChangeReasonStatus stockChangeReasonStatus) {
        stockChangeReasonStatusMapper.update(stockChangeReasonStatus);
    }

    @Override
    public void deleteById(Long stockChangeReasonStatusId) {
        stockChangeReasonStatusMapper.deleteById(stockChangeReasonStatusId);
    }
}
